<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport" />
    <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
    <meta http-equiv="Expires" CONTENT="0">
    <meta http-equiv="Cache-Control" CONTENT="no-cache">
    <meta http-equiv="Pragma" CONTENT="no-cache">
    <meta name="renderer" content="webkit" />
    <title>${content.title!}_话题_${site.siteName!}</title>
    <meta name="keywords" content="${content.keywords!}" />
    <meta name="description" content="[@text_cut s=content.content! len=120 append='...'/]"  />
    <link href="/default/css/bootstrap.css" rel="stylesheet" type="text/css" />
    <link href="/default/css/icon.css" rel="stylesheet" type="text/css" />
    <link href="/default/css/common.css" rel="stylesheet" type="text/css" />
    <link href="/default/css/link.css" rel="stylesheet" type="text/css" />
    <script src="/default/js/jquery.min.js"></script>
    <script src="/vendors/layer/layer.js" type="text/javascript"></script>
    <script src="/vendors/bootstrap/js/bootstrap.min.js"></script>
    <script src="/default/js/modules/common.js" ></script>
    <script src="/default/js/modules/topic.js" ></script>
</head>
<noscript unselectable="on" id="noscript">
    <div class="aw-404 aw-404-wrap container">
        <img src="/default/common/no-js.jpg">
        <p>你的浏览器禁用了JavaScript, 请开启后刷新浏览器获得更好的体验!</p>
    </div>
</noscript><body>
[#include "pc/default/common/header.html"/]
<div class="aw-container-wrap">
    [@fly_user method="userLogin"]

    <div class="container">
        <div class="row">
            <div class="aw-content-wrap clearfix">
                <div class="col-sm-12 col-md-9 aw-main-content">
                    <!-- 话题推荐bar -->
                    <!-- 话题bar -->
                    <div class="aw-mod aw-topic-bar" id="question_topic_editor">
                        <div class="tag-bar clearfix">
                            [@fly_label method="infoList" infoId="${content.id!}" infoType="1" status="2"]
                            [#list infoList.list as list]
                            [@fly_label method="info" id="${list.labelId!}"]
                            <span class="topic-tag">
								<a href="/t/${info.shortUrl!}" class="text">${info.title!}</a>
							</span>
                            [/@fly_label]
                            [/#list]
                            [/@fly_label]
                        </div>
                    </div>
                    <!-- end 话题bar -->
                    <div class="aw-mod aw-question-detail aw-item">
                        <div class="mod-head">
                            <h1>${content.title!}</h1>
                            [#if userLogin??]
                            <div class="operate clearfix">
                                <a href="javascript:;" class="follow btn btn-normal btn-success pull-left topic-follow" data-topic-id="${content.id!}">
                                    <span>关注</span>
                                    <em>|</em>
                                    <b>${content.countFollow!}</b>
                                </a>
                                <!-- 下拉菜单 -->
                                <div class="btn-group pull-left">
                                    <a class="btn btn-gray dropdown-toggle" href="javascript:;">...</a>
                                    <div class="aw-dropdown pull-right" role="menu" aria-labelledby="dropdownMenu">
                                        <ul class="aw-dropdown-list">
                                            <li>
                                                <a href="#">问题讨论</a>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                                <!-- end 下拉菜单 -->
                            </div>
                            [/#if]
                        </div>

                        <!-- 圈子模块 -->
                        [@fly_group method="groupInfo" id=content.groupId]
                        <div class="fly-group-card">
                            <div class="fly-group-card-inner">
                                <div class="fly-group-card-icon">
                                    <a href="/g-${groupInfo.shortUrl}" target="_blank" title="${groupInfo.groupName!}">
                                        <img src="[#if groupInfo.photo?? && groupInfo.photo?length gt 0]${groupInfo.photo!}[#else]/images/group_logo.jpg[/#if]" alt="${groupInfo.groupName!}">
                                    </a>
                                </div>
                                <div class="fly-group-card-info">
                                    <div class="group-card__desc">本文发表于圈子</div>
                                    <div class="fly-group-card-name"><a href="/g-${groupInfo.shortUrl}" target="_blank" title="${groupInfo.groupName!}">${groupInfo.groupName!}</a></div>
                                </div>
                                <div class="fly-group-card-extra">
                                    <a href="/g-${groupInfo.shortUrl}" target="_blank" title="${groupInfo.groupName!}">进入圈子参与更多话题讨论 <i class="glyphicon glyphicon-chevron-right"></i></a>
                                </div>
                            </div>
                        </div>
                        [/@fly_group]
                        <!-- 圈子模块 -->

                        <!--问题详情页内容页面钩子-->
                        <div class="mod-body">
                            <div class="content markitup-box">
                                ${content.content!}
                            </div>
                        </div>
                        <!--问题详情页内容页面钩子-->
                        <div class="mod-footer">
                            <div class="meta">
                                <span class="text-color-999">[@time_format time=content.createTime?string("yyyy-MM-dd HH:mm:ss")!/]</span>
                                <a class="aw-add-comment text-color-999 "><i class="icon icon-comment"></i>添加评论</a>
                                [#if userLogin??]
                                [#if userLogin.id = content.userId]
                                <a href="/user/topic/update/${content.id!}" class="aw-add-comment text-color-999 "><i class="icon icon-edit"></i>编辑</a>
                                <a href="javascript:;" data-content-id="${content.id!}" class="aw-add-comment text-color-999 "><i class="icon icon-delete"></i>删除</a>
                                [/#if]
                                [/#if]
                                <div class="pull-right more-operate">
                                    <a class="text-color-999 dropdown-toggle" data-toggle="dropdown" id="question_share"><i class="icon icon-share"></i>分享</a>
                                    <div class="aw-dropdown shareout pull-right bdsharebuttonbox">
                                        <ul class="aw-dropdown-list">
                                            <li><a href="javascript:;" class="bds_weixin" onclick="javascript:bShare.share(event,'weixin');return false;" title="分享到微信"> 微信</a></li>
                                            <li><a href="javascript:;" class="bds_sqq" onclick="javascript:bShare.share(event,'qqim');return false;" title="分享到QQ"> QQ</a></li>
                                            <li><a href="javascript:;" class="bds_tsina" onclick="javascript:bShare.share(event,'sinaminiblog');return false;" title="分享到新浪微博"> 微博</a></li>
                                            <li><a href="javascript:;" class="bds_qzone" onclick="javascript:bShare.share(event,'qzone');return false;" title="分享到QQ空间"> 空间</a></li>
                                        </ul>
                                    </div>
                                    <a href="javascript:;" class="text-color-999"><i class="icon icon-report"></i>举报</a>
                                </div>
                            </div>
                        </div>
                        <!--问题详情页内容页面钩子-->
                        <!-- 站内邀请 -->
                        <div class="aw-invite-box collapse">
                            <div class="mod-head clearfix">
                                <div class="search-box pull-left">
                                    <input id="invite-input" class="form-control" type="text"  placeholder="搜索你想邀请的人..."/>
                                    <div class="aw-dropdown">
                                        <p class="title">没有找到相关结果</p>
                                        <ul class="aw-dropdown-list"></ul>
                                    </div>
                                    <i class="icon icon-search"></i>
                                </div>
                                <div class="invite-list pull-left collapse">
                                    已邀请:
                                </div>
                            </div>
                        </div>
                        <!-- end 站内邀请 -->
                        <!-- 相关链接 -->
                        <div class="aw-question-related-box collapse">
                            <form action="#" method="post" onsubmit="return false" id="related_link_form">
                                <div class="mod-head">
                                    <h2>与内容相关的链接</h2>
                                </div>
                                <div class="mod-body clearfix">
                                    <input type="hidden" name="item_id" value="32931" />
                                    <input type="text" class="form-control pull-left " name="link" value="" />
                                    <a class="pull-left btn btn-success">提交</a>
                                </div>
                            </form>
                        </div>
                        <!-- end 相关链接 -->
                    </div>
                    [@fly_topic method="comment" topicId=content.id p='${p?string}']
                    [#if comment.total > 0]
                    <div class="aw-mod aw-question-comment">
                        <div class="mod-head">
                            <ul class="nav nav-tabs aw-nav-tabs active">
                                <li><a href="#">关注的人</a></li>
                                <li><a href="#">时间 <i class="icon icon-up"></i></a></li>
                                <li class="active"><a href="#">票数</a></li>
                                <h2 class="hidden-xs">${content.countComment!} 个回复</h2>
                            </ul>
                        </div>
                        [#list comment.list as list]
                        <div class="mod-body aw-feed-list">
                            <div class="aw-item" uninterested_count="0" force_fold="0" id="answer_list_14545">
                                [@fly_user method="user" id='${list.userId!}']
                                <div class="mod-head">
                                    <a class="anchor" name="answer_14545"></a>
                                    <!-- 用户头像 -->
                                    <a class="aw-user-img aw-border-radius-5" href="/u/${user.shortUrl}" data-id="907"><img src="[#if user.avatar??]${user.avatar!}[#else]/images/avatar-max-img.png[/#if]" alt=""></a>										<!-- end 用户头像 -->
                                    <div class="title">
                                        <p>
                                            <a class="aw-user-name" href="/u/${user.shortUrl}" data-id="907">${user.nickname!}</a>
                                            <span class="text-color-999">- [#if user.signature!]${user.signature}[#else]这个家伙很懒，签名不写！[/#if]</span>
                                        </p>
                                    </div>
                                </div>
                                [/@fly_user]
                                <div class="mod-body clearfix">
                                    <!-- 评论内容 -->
                                    <div class="markitup-box">${list.content!}</div>
                                    <!-- end 评论内容 -->
                                </div>
                                <div class="mod-footer">
                                    <!-- 社交操作 -->
                                    <div class="meta clearfix">
                                        <span class="text-color-999 pull-right">${list.createTime?string("yyyy-MM-dd HH:mm:ss")!}</span>
                                        <span class="operate">
                                            <a style="color: red;cursor: pointer;" class="agree disabled"><img style="margin-bottom: 5px;" src="/images/shang.png" width="23" title="打赏"></a>
                                        </span>
                                        <span class="operate">
                                            <a href="javascript:;" class="text-color-999"><i class="icon icon-report"></i> 举报</a>
                                        </span>
                                        <!-- 投票栏 -->
                                        <span class="operate">
                                            <a class="agree"><i data-placement="right" title="" data-toggle="tooltip" class="icon icon-agree" data-original-title="赞同回复"></i> <b class="count"> ${list.countDigg!}</b></a>
                                            <a class="disagree"><i data-placement="right" title="" data-toggle="tooltip" class="icon icon-disagree" data-original-title="对回复持反对意见"></i> <b class="count"> ${list.countBurys!}</b></a>
                                        </span>
                                        <!-- end 投票栏 -->
                                        <span class="operate">
											<a class="aw-add-comment" href="javascript:;" data-comment-id="${list.id!}"><i class="icon icon-comment"></i> ${list.countComment!}</a>
										</span>
                                        [@fly_user method="userLogin"]
                                        [#if userLogin]
                                        [#if userLogin.id = list.userId]
                                        <span class="operate">
											<a class="aw-edit-comment" href="javascript:;" data-comment-id="${list.id!}"><i class="fa fa-pencil-square-o"></i> 修改</a>
                                            <a class="aw-remove-comment" href="javascript:;" data-comment-id="${list.id!}"><i class="fa fa-remove"></i> 删除</a>
										</span>
                                        [/#if]
                                        [/#if]
                                        [/@fly_user]

                                        <!-- 可显示/隐藏的操作box -->
                                        <!-- end 可显示/隐藏的操作box -->
                                    </div>
                                    [@fly_topic method="reComment" referId='${list.id!}' pageSize="5"]
                                    <!-- end 社交操作 -->
                                    <div class="aw-comment-box box-comment"[#if reComment.total > 0] style="display: block;"[#else] style="display: none;"[/#if]>
                                        [#if reComment.total > 0]
                                        <div class="aw-comment-list">
                                            <ul>
                                                [#list reComment.list as relist]
                                                [@fly_user method="user" id='${relist.userId!}']
                                                <li>
                                                    <a class="aw-user-name" href="/u/${user.shortUrl}">
                                                        <img src="[#if user.avatar??]${user.avatar!}[#else]/images/avatar_boy.jpg[/#if]" alt="${user.nickname!}">
                                                    </a>
                                                    <div>
                                                        <p class="clearfix">
                                                            [@fly_user method="userLogin"]
                                                            [#if userLogin??]
                                                            <span class="pull-right"><a href="javascript:;" class="re-comment" data-comment-id="${relist.id!}" data-nickname="${user.nickname!}">回复</a></span>
                                                            [/#if]
                                                            [/@fly_user]
                                                            <a href="/u/${user.shortUrl}" class="aw-user-name author">${user.nickname!}</a>
                                                            •<span>${relist.createTime?string("yyyy-MM-dd HH:mm:ss")!}</span>
                                                        </p>
                                                        <p class="clearfix">${relist.content!}</p>
                                                    </div>
                                                </li>
                                                [/@fly_user]
                                                [/#list]
                                            </ul>
                                        </div>
                                        [@fly_user method="userLogin"]
                                        [#if userLogin??]
                                        <div class="aw-comment-box-form">
                                            <div class="aw-comment-box-main">
                                                <div class="placeholder" style="display:block;">评论一下...</div>
                                                <div class="form-control message" contenteditable="true"></div>
                                                <div class="aw-comment-box-btn But" style="display: none;">
                                                    <a class="imgBtn" href="javascript:void(0);"></a>
                                                    <span class="pull-right">
                                                        <a href="javascript:;" class="btn btn-mini btn-success comment-submit" data-comment-id="${list.id!}">评论</a>
                                                        <a href="javascript:;" class="btn btn-mini btn-gray close-comment-box">取消</a>
                                                    </span>
                                                </div>
                                            </div>
                                        </div>
                                        [/#if]
                                        [/@fly_user]
                                        [#else]
                                        <div class="aw-comment-list"><div align="center" class="no-comment">暂无评论</div></div>
                                        [/#if]
                                    </div>
                                    [/@fly_topic]
                                </div>
                            </div>
                        </div>
                        [/#list]
                    </div>
                    [/#if]
                    [/@fly_topic]
                    [@fly_user method="userLogin"]
                    [#if userLogin??]
                    <div class="aw-mod aw-replay-box question">
                        <a name="answer_form"></a>
                        <form action="#" onsubmit="return false;" method="post" id="answer_form" class="question_answer_form">
                            <div class="mod-head">
                                <a href="/u/${userLogin.shortUrl!}" class="aw-user-name"><img alt="${user.nickname!}" src="[#if userLogin.avatar??]${userLogin.avatar!}[#else]/images/avatar_boy.jpg[/#if]"></a>
                                <p>
                                    <label class="pull-right">
                                        <input type="checkbox" checked="checked" value="1" name="auto_focus"> 关注问题
                                    </label>
                                    <label class="pull-right">
                                        <a href="#" target="_blank">积分规则</a>
                                    </label>
                                    ${user.nickname!}
                                </p>
                            </div>

                            <div class="mod-body">
                                <div class="aw-mod aw-editor-box">
                                    <div class="mod-head">
                                        <div class="wmd-panel">
                                            <div id="content"></div>
                                            <script type="text/javascript" src="/vendors/wangEditor/wangEditor.min.js"></script>
                                            <script type="text/javascript">
                                                const E = window.wangEditor
                                                const editor = new E('#content')
                                                // 默认情况下，只有 IE 和 旧版 Edge 会使用兼容模式，如果需要在其它浏览器上也使用兼容模式，可以在函数内进行判定
                                                editor.config.compatibleMode = function () {
                                                    // 返回 true 表示使用兼容模式；返回 false 使用标准模式
                                                    return true
                                                }
                                                // 配置菜单栏，删减菜单，调整顺序
                                                editor.config.menus = [
                                                    'bold',
                                                    'head',
                                                    'link',
                                                    'italic',
                                                    'underline',
                                                    'image'
                                                ]
                                                // 当我们使用兼容模式的时候，可以自定义记录的频率，默认 200 ms
                                                editor.config.onchangeTimeout = 500 // 修改为 500 ms
                                                // 还可以修改历史记录的步数。默认 30 步
                                                editor.config.historyMaxSize = 50 // 修改为 50 步
                                                editor.config.placeholder = ''
                                                editor.config.height = 100
                                                editor.create()
                                            </script>
                                        </div>
                                    </div>
                                    <div class="mod-body clearfix">
                                        <a id="preview" href="javascript:;" style="margin-left: 15px">实时预览</a>
                                        <a id="saveDraft" data-type="answer" class="pull-right" style="margin-right: 20px;">保存草稿</a>
                                        <span class="pull-right text-color-999" id="answer_content_message">&nbsp;</span>
                                    </div>
                                    <div class="mod-body clearfix">
                                        <a href="javascript:;" onclick="AWS.ajax_post($('#answer_form'), AWS.ajax_processer, 'reply_question');" class="btn btn-normal btn-success pull-right btn-reply" id="publish_submit">回复</a>
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                    [#else]
                    <div class="aw-mod aw-replay-box question">
                        <p align="center">要回复问题请先<a href="/user/login?redirectUrl=/topic/${content.id!}">登录</a>或<a href="/register/phone">注册</a></p>
                    </div>
                    [/#if]
                    [/@fly_user]
                </div>
                <!-- 侧边栏 -->
                <div class="col-md-3 aw-side-bar hidden-xs hidden-sm">
                    <!-- 发起人 -->
                    [@fly_user method="user" id='${content.userId!}']
                    [@fly_user method="userLogin"]
                    <div class="aw-mod">
                        <div class="mod-head">
                            <h3>话题发起人</h3>
                        </div>
                        <div class="mod-body">
                            <dl>
                                <dt class="pull-left aw-border-radius-5">
                                    <a href="/u/${user.shortUrl}"><img src="[#if user.avatar??]${user.avatar!}[#else]/images/avatar_boy.jpg[/#if]" alt="${user.nickname!}" /></a>
                                </dt>
                                <dd class="pull-left">
                                    <a class="aw-user-name" href="/u/${user.shortUrl}">${user.nickname!}</a>
                                    [#if userLogin??]
                                    [#if userLogin.id != content.userId]
                                    [@fly_user method="checkFollow" id="${user.id!}" userId="${userLogin.id!}"]
                                    <a class="icon-inverse follow follow-user tooltips icon icon-plus[#if checkFollow == true] active[/#if]" data-user-id="${user.id!}"></a>
                                    [/@fly_user]
                                    [/#if]
                                    [/#if]
                                    <p></p>
                                </dd>
                            </dl>
                        </div>
                    </div>
                    [/@fly_user]
                    [/@fly_user]
                    <!-- end 发起人 -->
                    <!-- 相关问题 -->
                    <div class="aw-mod">
                        <div class="mod-head">
                            <h3>相关问题</h3>
                        </div>
                        <div class="mod-body font-size-12">
                            <ul>
                                [@fly_search method="relevant" title='${content.title!}' id='${content.id!}' pageSize='10']
                                [#list relevant.list as list]
                                <li><a href="/topic/${list.id!}">${list.title!}</a></li>
                                [/#list]
                                [/@fly_search]
                            </ul>
                        </div>
                    </div>
                    <!-- end 相关问题 -->
                    <!-- 问题状态 -->
                    <div class="aw-mod question-status">
                        <div class="mod-head">
                            <h3>问题状态</h3>
                        </div>
                        <div class="mod-body">
                            <ul>
                                <li>最新活动: <span class="aw-text-color-blue">${content.createTime?string("yyyy-MM-dd HH:mm:ss")!}</span></li>
                                <li>浏览: <span class="aw-text-color-blue">${content.countView!}</span></li>
                                <li>关注: <span class="aw-text-color-blue">0</span> 人</li>
                                <li class="aw-border-radius-5" id="focus_users"></li>
                            </ul>
                        </div>
                    </div>
                    <!-- end 问题状态 -->
                </div>
                <!-- end 侧边栏 -->
            </div>
        </div>
    </div>
    [/@fly_user]
</div>
[#include "pc/default/common/footer.html"/]
<script type="text/javascript" src="/default/js/modules/statistics.js"></script>
</body>
</html>